#!/usr/bin/env python
# -*- coding: utf-8 -*-

import requests

s = requests.session()

# 登陆
datas = {'username': 'test01', 'password': '30b843b0473cfff47113a3579d26a189'}
url = 'http://localhost:8888/verydows/index.php?c=user&a=login&step=submit'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
r = s.post(url, data=datas)
if '登录成功' in r.text:
    print('登录成功')
else:
    print('登录失败')
